package com.bai.localshop.pojo.dto;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import lombok.Data;

@Data
public class AddressAddDTO {

    @NotBlank(message = "收货人不能为空")
    private String consignee;

    @NotBlank(message = "手机号不能为空")
    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确")
    private String phone;

    private Integer sex;

    @NotBlank(message = "省份不能为空")
    private String provinceCode;

    @NotBlank(message = "省份名称不能为空")
    private String provinceName;

    @NotBlank(message = "城市不能为空")
    private String cityCode;

    @NotBlank(message = "城市名称不能为空")
    private String cityName;

    @NotBlank(message = "区县不能为空")
    private String districtCode;

    @NotBlank(message = "区县名称不能为空")
    private String districtName;

    @NotBlank(message = "详细地址不能为空")
    private String detail;

    private String label;

    private Integer isDefault;
}